#include "port.h"
#include "motion_custom.h"
/*
,EMPL_TARGET_STM32F1,MPU9250,MPL_LOG_NDEBUG=1,EMPL
MPU6500

*/

int inven_putc(int ch )
{
  //* Place your implementation of inven_putc here 
  //* e.g. write a character to the USART 
#if 0//ndef MOTION_DEBUG_ENABLE  
  uart_putc(CONSOLE_DEVICE,ch);
#endif
  return ch;
}

int inven_my_putc(int ch )
{
  //* Place your implementation of inven_putc here 
  //* e.g. write a character to the USART 
#if 0//def MOTION_DEBUG_ENABLE  
  uart_putc(CONSOLE_DEVICE,ch);
#endif
  return ch;
}

unsigned long Sensors_I2C_WriteRegister(unsigned char slave_addr, unsigned char reg_addr,unsigned char length, unsigned char const *data)
{
	if(TRUE==i2c_string_write (slave_addr,data,reg_addr,length)){
		return 0;
	}
	return ~0;
}

unsigned long Sensors_I2C_ReadRegister(unsigned char slave_addr, unsigned char reg_addr,unsigned char length, unsigned char *data)
{
	 if(TRUE==i2c_string_read (slave_addr,reg_addr,data,length)){
		 return 0;
	 }
	 return ~0;
}

void mdelay(unsigned long num_ms)
{
	sys_delay_ms(num_ms);
}

int get_tick_count(unsigned long *count)
{
        count[0] = g_ul_ms_ticks;
	return 0;
}


